<template>
  <div id="community">
    <div id="top">
       <p class="first">
         <span>社区</span>
         <input type="text" placeholder="想去哪里,搜一搜">
       </p>

       <p class="second">
         <van-notice-bar
          left-icon="volume-o"
          text="播报：全国景区优惠，快来薅羊毛"
          color="black"
          background="white"
          />
       </p>
    </div>

    <div id="main">
        <h3>出行灵感</h3>
        <div class="first"></div>
        <div class="second">

        </div>
         <div class="second">
        </div>
        <div class="third"></div>
        <div class="forth"></div>
        <div class="fifth"></div>
    </div>

    <div id="bottom">
      <h3>社区评论</h3>
      <ul>
        <li>
          <img src="../../assets/imgsXLL/14.png" alt="">
          <div>
          <span>Juanf</span>
          <i>2021-11-17</i>
          </div>
          <button @click="clickCount">+关注</button>

          <strong></strong>
          <p><em><img src="../../assets/imgsXLL/16.png" alt="">丽水</em>
          <span><img src="../../assets/imgsXLL/18.png" alt=""></span>  <span><img src="../../assets/imgsXLL/17.png" alt=""></span></p>
        </li>

         <li>
          <img src="../../assets/imgsXLL/14.png" alt="">
          <div>
          <span>Juanf</span>
          <i>2021-11-17</i>
          </div>
          <button @click="clickCount">+关注</button>

          <strong></strong>
          <p><em><img src="../../assets/imgsXLL/16.png" alt="">丽水</em>
          <span><img src="../../assets/imgsXLL/18.png" alt=""></span>  <span><img src="../../assets/imgsXLL/17.png" alt=""></span></p>
        </li>

         <li>
          <img src="../../assets/imgsXLL/14.png" alt="">
          <div>
          <span>Juanf</span>
          <i>2021-11-17</i>
          </div>
          <button @click="clickCount">+关注</button>

          <strong></strong>
          <p><em><img src="../../assets/imgsXLL/16.png" alt="">丽水</em>
          <span><img src="../../assets/imgsXLL/18.png" alt=""></span>  <span><img src="../../assets/imgsXLL/17.png" alt=""></span></p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import { ref } from "vue";
import { NoticeBar } from "vant";
export default {
  components: { [NoticeBar.name]: NoticeBar },
  name: "Community",
  setup() {
    const value = ref("");
    let count = ref(0);
    
    function clickCount()
    {
      count.value++;
      localStorage.setItem('count',count.value)
    }
    return {
      value,
      clickCount,
      count
    };
  }
};
</script>


<style lang="less" scoped>
* {
  margin: 0;
  padding: 0;
}
#top {
  width: 100%;
  height: 200px;
  background-image: url("../../assets/imgsXLL/8.png");
  background-size: 100% 100%;
  position: relative;
  > .first {
    position: absolute;
    top: 20px;
    span {
      color: white;
      font-size: 18px;
      display: inline-block;
      width: 80px;
      text-align: center;
    }
    input {
      border-radius: 20px;
      border: none;
      display: inline-block;
      width: 300px;
      height: 30px;
      padding-left: 20px;
      font-size: 18px;
    }
  }
  > .second {
    position: absolute;
    bottom: 60px;
    width: 92%;
    margin-left: 15px;
    > .van-notice-bar {
      border-radius: 20px;
      height: 30px;
      font-size: 18px;
    }
  }
}
#community {
  background-color: white;
  height: 100%;
}
#main {
  padding: 10px;
  > h3 {
    font-size: 18px;
  }
  > .first {
    display: inline-block;
    width: 48%;
    height: 200px;
    float: left;
    background-image: url("../../assets/imgsXLL/11.png");
    background-size: 240%;
    background-position: -50px 10px;
    background-repeat: no-repeat;
    margin-right: 10px;
  }
  > .second {
    display: inline-block;
    width: 49%;
    height: 90px;
    float: left;
    background-image: url("../../assets/imgsXLL/9.png");
    background-size: 100%;
    background-position: 0px -10px;
    background-repeat: no-repeat;
  }
  > .third {
    display: inline-block;
    width: 100%;
    height: 60px;
    background-image: url("../../assets/imgsXLL/10.png");
    background-size: 105%;
    background-position: -13px -155px;
    background-repeat: no-repeat;
  }

  > .forth {
    display: inline-block;
    width: 48%;
    height: 140px;
    float: left;
    background-image: url("../../assets/imgsXLL/12.png");
    background-size: 141%;
    background-position: 0px -18px;
    background-repeat: no-repeat;
    margin-right: 5px;
  }

  > .fifth {
    display: inline-block;
    width: 48%;
    height: 140px;
    float: left;
    background-image: url("../../assets/imgsXLL/13.png");
    background-size: 110%;
    background-position: -10px -10px;
    background-repeat: no-repeat;
    margin-right: 5px;
  }
}

#bottom {
  padding: 10px;
  > h3 {
    font-size: 18px;
  }
  > ul {
    //padding-top: 10px;
    > li {
      margin-top: 20px;
      > img {
        display: inline-block;
        float: left;
        width: 80px;
      }
      > div {
        display: inline-block;
        font-size: 18px;
        > i {
          font-style: normal;
          display: block;
          height: 40px;
          line-height: 40px;
        }
        > span {
          height: 30px;
          line-height: 30px;
        }
      }
      > button {
        font-size: 14px;
        float: right;
        border-radius: 10px;
        width: 60px;
        height: 40px;
        border: none;
        margin-top: 20px;
      }
      > strong {
        display: block;
        width: 100%;
        height: 280px;
        background-image: url("../../assets/imgsXLL/15.png");
        background-size: 120%;
        background-position: -20px 5px;
      }
      > p {
        font-size: 18px;
        height: 30px;
        line-height: 30px;
        margin-top: 5px;
        > em {
          font-style: normal;
          line-height: 30px;
        }
        img {
          width: 25px;
          margin-right: 10px;
        }
        > span {
          float: right;
        }
      }
    }
  }
}
</style>
